Skip to content

Conversation

@matthias-springer
Copy link
Member

This is needed for a subsequent commit that reads location information when lowering gpu.assert.

@llvmbot
Copy link
Member

llvmbot commented Dec 18, 2024

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-gpu

Author: Matthias Springer (matthias-springer)

Changes

This is needed for a subsequent commit that reads location information when lowering gpu.assert.


Full diff: https://github.com/llvm/llvm-project/pull/120432.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp (-1)
diff --git a/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp b/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
index fb440756e0c1d5..20d7372eef85d5 100644
--- a/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
+++ b/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
@@ -73,7 +73,6 @@ void buildCommonPassPipeline(
 //===----------------------------------------------------------------------===//
 void buildGpuPassPipeline(OpPassManager &pm,
                           const mlir::gpu::GPUToNVVMPipelineOptions &options) {
-  pm.addNestedPass<gpu::GPUModuleOp>(createStripDebugInfoPass());
   ConvertGpuOpsToNVVMOpsOptions opt;
   opt.useBarePtrCallConv = options.kernelUseBarePtrCallConv;
   opt.indexBitwidth = options.indexBitWidth;

@matthias-springer matthias-springer changed the title [mlir][GPU] Do not strip debug info when lowering to NVVM [mlir][GPU] Do not strip location info when lowering to NVVM Dec 18, 2024
//===----------------------------------------------------------------------===//
void buildGpuPassPipeline(OpPassManager &pm,
const mlir::gpu::GPUToNVVMPipelineOptions &options) {
pm.addNestedPass<gpu::GPUModuleOp>(createStripDebugInfoPass());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this added in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. Looking at the git history (https://reviews.llvm.org/D155463), there was a test case that had it in the pass pipeline. See also https://reviews.llvm.org/D103187. Maybe @ThomasRaoux knows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember that passing ptx with debug info used to crash nvidia driver. I had not debugged it at the time though

Copy link
Member Author

@matthias-springer matthias-springer Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. Given that the printf integration test works on my machine, this seems to be resolved. Let's see if the build bot complains after I merge this...

@matthias-springer matthias-springer merged commit 0745add into main Dec 19, 2024
11 checks passed
@matthias-springer matthias-springer deleted the users/matthias-springer/do_not_strip_debug branch December 19, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants